import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from  'element-plus'
import "element-plus/dist/index.css"
import './assets/css/element-variables.scss'
import './assets/fonts/iconfont/iconfont.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import '@/util/dateUtils.js'

import VueMarkdownEditor  from '@kangc/v-md-editor'
import VMdPreview from '@kangc/v-md-editor/lib/preview'
import '@kangc/v-md-editor/lib/style/base-editor.css'
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js'
import '@kangc/v-md-editor/lib/theme/style/github.css'
import hljs from 'highlight.js'
VueMarkdownEditor.use(githubTheme, {
    Hljs: hljs,
});
VMdPreview.use(githubTheme, {
    Hljs: hljs,
});

const app = createApp(App)
for (const[key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key,component)
}
app.use(ElementPlus).use(router).use(store).use(VueMarkdownEditor).use(VMdPreview)
app.mount("#app")